package com.shiftl.ui.aroma;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.HorizontalSplitPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.StackPanel;
import com.google.gwt.user.client.ui.TabPanel;
import com.shiftl.service.incense.client.IncenseAdminService;
import com.shiftl.service.incense.client.IncenseAdminServiceAsync;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class IncenseDBEntryPoint implements EntryPoint {

	/**
	 * Create a remote service proxy to talk to the server-side Greeting service.
	 */
	private final IncenseAdminServiceAsync incenseService = GWT.create(IncenseAdminService.class);

	private Panel incenseListing;

	private StackPanel categories;

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {

		// build categories panel
		categories = new StackPanel();
		categories.add(new Label("Foo"), "foo");
		categories.add(new Label("Bar"), "bar");
		categories.add(new Label("Baz"), "baz");

		incenseListing = new IncenseEditPanel();

		TabPanel tp = new TabPanel();
		tp.add(incenseListing, "EditProducts");

		HorizontalSplitPanel hSplit = new HorizontalSplitPanel();
		hSplit.setLeftWidget(categories);
		hSplit.setRightWidget(tp);

		hSplit.setSize("850px", "850px");
		RootPanel.get("incenseListing").add(hSplit);
	}

}
